import os
import shutil

parentPath = "F:/IdeaProjects/yai"

setting_gradle_path = ""
build_gradle_path = ""

def create_moduel(module_name):
    module_path = parentPath + "\\" + module_name
    shutil.copytree("F:\me\python-learning\gradle-module",module_path)
    # java_path = module_path + "\\src\\main\\java"
    # test_path = module_path + "\\src\\test\\java"
    # if os.path.exists(java_path) is False:
    #     os.makedirs(java_path)
    # if os.path.exists(test_path) is False:
    #     os.makedirs(test_path)
    # if os.path.exists(module_path+"\\build.gradle") is False:
    #     open(module_path + "\\build.gradle", mode="x")


def delete_module(module_name):
    return


def append(text):
    return


def copy(a, b):
    shutil.copyfile(a, b)


# 文件操作API https://www.py.cn/faq/python/13438.html
def create_parent():
    shutil.copytree("F:\me\python-learning\gradle",parentPath,dirs_exist_ok=True)


if __name__ == '__main__':
    # 构建父目录
    # create_parent()
    # 构建子模块
    create_moduel("project")
